﻿using System.Windows.Controls;

namespace HOG.Controls
{
    public partial class WaitControl : UserControl
    {
        public WaitControl()
        {
            InitializeComponent();
        }
        private int max = 0;
        private int actual = 0;
        public void Restart(int max)
        {
            actual = 0;
            this.max = max;
            LodingStatus.Opacity = .0;
            TextStatus.Content = "1/" + max.ToString();
        }
        public void ProcessChange()
        {
            actual++;
            if (max > 0)
            {
                LodingStatus.Opacity = (double)actual / (double)max;
                TextStatus.Content = actual.ToString() + "/" + max.ToString();
            }
        }
    }
}
